package cn.uniqueww.javadesignpatterns.demos.design.strategy;

import org.springframework.stereotype.Component;

/**
 * 微信支付
 * @since 2024/1/17 11:35 上午
 *
 */
@Component
public class WXPay implements IPay{

        /**
        * 支付
        * @param amount
        * @return
        */
        @Override
        public String pay(int amount) {
            return "微信支付了"+amount+"元";
        }

    @Override
    public void afterPropertiesSet() throws Exception {
        PayHandler.addPay(2,this);
    }
}
